package com.maxd.bean;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.compress.utils.Lists;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageRes<T> {

    @ApiModelProperty("总记录数")
    private Long total;

    @ApiModelProperty("记录列表")
    private List<T> rows;

    public static <T> PageRes<T> empty() {
        return new PageRes<>(0l, Lists.newArrayList());
    }
}
